export default {
  namespaced: true,
  state: {
    loginUser: JSON.parse(window.localStorage.getItem('usersinfo') || '{}'),
    message:window.localStorage.getItem('message') || ''
  },
  mutations: {
    getuserinfolist(state, payload) {
      state.loginUser = payload;
      window.localStorage.setItem('usersinfo', JSON.stringify(state.loginUser))
      console.log("state.loginUser", state.loginUser);
    },
    letmessageolus(state,payload){
      if(state.message==""){
        state.message=0
      }
        state.message++;
        window.localStorage.setItem('message', state.message)
      
      console.log("state.meaage", state.message);
    },
    letmessageominus(state,payload){
      if(state.message>0){
        state.message--;
        window.localStorage.setItem('message', state.message)
        state.message==0?null:state.message;
      }
       
      
      console.log("state.meaage", state.message);
    }
  },
 
}
  

